<include file="Public:header" />
<!--网站设置-->
<div class="pad_lr_10">
    <div class="col_tab">
    <ul class="J_tabs tab_but cu_li">
        <li class="current">站点设置</li>
        <li>基本信息</li>
    </ul>
        </div>
    <form id="info_form" action="{:U('Setting/edit')}" method="post">
    <div class="J_panes">
        <div class="content_list pad_10">
    <input type="hidden" name="site_id" value="{$site_id}" />
	<table width="100%" class="table_form">
        <tr>
            <th width="150">{:L('site_name')} :</th>
            <td><input type="text" name="info[site][title]" class="input-text" size="50" value="{$info['title']}"></td>
        </tr>

        <!--tr>
            <th>多说插件配置 :</th>
            <td><input type="text" name="info[site][shortName]" class="input-text" size="20" value="{$info['shortName']}">在多说申请的域名前辍,如:zhuizhan.duoshuo.com，则只须填写 zhuizhan 就可以了。<a href="http://duoshuo.com/create-site" target="_blank" style="color:#ff0000;">插件申请</a></td>
        </tr-->
        <tr>
            <th>{:L('seo_title')} :</th>
            <td><input type="text" name="info[site][seo_title]" class="input-text" size="50" value="{$info['seo_title']}"></td>
        </tr>

        <tr>
            <th>{:L('seo_keys')} :</th>
            <td><input type="text" name="info[site][seo_keys]" class="input-text" size="50" value="{$info['seo_keys']}"></td>
        </tr>
        <tr>
            <th>{:L('seo_desc')} :</th>
            <td><textarea rows="3" cols="50" name="info[site][seo_desc]">{$info['seo_desc']}</textarea></td>
        </tr>
        <tr>
            <th>页头logo图片：</th>
            <td>
                <input type="text" name="info[site][headlogo]" id="J_img" value="{$info.headlogo}" class="input-text fl mr10" size="30">
                <div id="J_upload_img" class="upload_btn" onclick="ajax_up('J_upload_img','J_img')"><span>{:L('upload')}</span></div>
            </td>
        </tr>
        <tr>
            <th>页脚logo图片：</th>
            <td>
                <input type="text" name="info[site][footlogo]"  value="{$info.footlogo}" id="J_img2" class="input-text fl mr10" size="30">
                <div id="J_upload_img2" class="upload_btn" onclick="ajax_up('J_upload_img2','J_img2')"><span>{:L('upload')}</span></div>
            </td>
        </tr>
        <tr>
            <th>伪静态 :</th>
            <td>
                <input type="radio" name="weijintai" onclick="dissetting(1)" value="1" <if condition="$url['URL_MODEL'] gt 0">checked</if>/>启用
                <input type="radio" name="weijintai" onclick="dissetting(0)" value="0" <if condition="$url['URL_MODEL'] eq 0">checked</if> />禁用
            </td>
        </tr>
        <tr id="disw" <if condition="$url['URL_MODEL'] eq 0">class="hidden"</if>>
            <th>伪静态设置 :</th>
            <td>
                <table>
                    <tr>
                        <th>后辍 :</th>
                        <td><input type="text" name="w[houzhui]" value="{$url['URL_HTML_SUFFIX']}" class="input-text" size="10" /></td>
                    </tr>
                    <tr>
                        <th>url分隔符 :</th>
                        <td><input type='text' name="w[fenge]" class="input-text" value="{$url['URL_PATHINFO_DEPR']}" size="10" /></td>
                    </tr>
                    <tr>
                        <th>模式 :</th>
                        <td>
                            <input type="radio" name="w[moshi]" id="pathinfo" value="1" <if condition="$url['URL_MODEL'] eq 1">checked</if> /><label for="pathinfo">PATHINFO模式</label>
                            <input type="radio" name="w[moshi]" id="rewrite" value="2" <if condition="$url['URL_MODEL'] eq 2">checked</if>/><label for="rewrite">REWRITE模式</label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <th>新浪微博地址：</th>
            <td>
                <input type="text" name="info[site][sina]" value="{$info.sina}" class="input-text" size="30"/>
            </td>
        </tr>
        <tr>
            <th>腾讯微博地址：</th>
            <td>
                <input type="text" name="info[site][qqweibo]" value="{$info.qqweibo}" class="input-text" size="30"/>
            </td>
        </tr>
        <tr>
            <th>关联链接替换次数 :</th>
            <td>
                <input type="text" name="w[replacenum]" class="input-text" size="10" value="{$url['REPLACE_NUMS']}"/>
            </td>
        </tr>
        <tr>
            <th>{:L('site_icp')} :</th>
            <td><input type="text" name="info[site][icp]" class="input-text" size="50" value="{$info['icp']}"></td>
        </tr>

        <tr>
            <th>script代码 :</th>
            <td><textarea rows="3" cols="50" name="w[countcode]">{:stripslashes($url['SCRIPTCODE'])}</textarea><span>统计代码 分享代码</span></td>
        </tr>

	</table>

            </div>
        <div class="contetn_list pad_10 hidden">
            <table width="100%" class="table_form">
                <tr>
                    <th width="150">企业名称 :</th>
                    <td><input type="text" name="info[site][companyname]" class="input-text" value="{$info['companyname']}" size="40"></td>
                </tr>
                <tr>
                    <th width="150">联系人 :</th>
                    <td><input type="text" name="info[site][contact]" class="input-text" value="{$info['contact']}" size="40"></td>
                </tr>
                <tr>
                    <th>服务电话 :</th>
                    <td><input type="text" name="info[site][telphone]" class="input-text" value="{$info['telphone']}" size="30"></td>
                </tr>
                <tr>
                    <th>客服QQ :</th>
                    <td><input type="text" name="info[site][qq]" class="input-text" value="{$info['qq']}" size="30"></td>
                </tr>
                <tr>
                    <th>传真电话 :</th>
                    <td><input type="text" name="info[site][fex]" class="input-text" value="{$info['fex']}" size="30"></td>
                </tr>
                <tr>
                    <th>邮　　箱 :</th>
                    <td>
                        <input type="text" name="info[site][email]" class="input-text" value="{$info['email']}" size="30">
                    </td>
                </tr>
                <tr>
                    <th>邮政编码 :</th>
                    <td>
                        <input type="text" class="input-text" value="{$info['zcode']}" name="info[site][zcode]" size="40"/>
                    </td>
                </tr>
                <tr>
                    <th>公司地址 :</th>
                    <td><input type="text" class="input-text" name="info[site][address]" value="{$info['address']}" size="60"></td>
                </tr>
            </table>
        </div>
        </div>
        <div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>

    </form>
</div>
<include file="Public:footer" />
<script src="__JS__/fileuploader.js"></script>
<script>
$(function(){
    $('ul.J_tabs').tabs('div.J_panes > div');

    $('.J_change_status').live('click', function(){
        if($(this).val() == '2'){
            $('#J_closed_reason').fadeIn();
        }else{
            $('#J_closed_reason').fadeOut();
        }
    });
});
    function dissetting(v){
        if(v==1){
            $("#disw").show();
        }else{
            $("#disw").hide();
        }
    }
function ajax_up(btn,txt){
    var img_uploader = new qq.FileUploaderBasic({
        allowedExtensions: ['jpg','gif','jpeg','png','bmp','pdg'],
        button: document.getElementById(btn),
        multiple: false,
        action: "{:U('Ad/ajax_upload_img')}",
        inputName: 'img',
        forceMultipart: true, //用$_FILES
        messages: {
            typeError: lang.upload_type_error,
            sizeError: lang.upload_size_error,
            minSizeError: lang.upload_minsize_error,
            emptyError: lang.upload_empty_error,
            noFilesError: lang.upload_nofile_error,
            onLeave: lang.upload_onLeave
        },
        showMessage: function(message){
            $.pinphp.tip({content:message, icon:'error'});
        },
        onSubmit: function(id, fileName){
            $('#'+btn).addClass('btn_disabled').find('span').text(lang.uploading);
        },
        onComplete: function(id, fileName, result){
            $('#'+btn).removeClass('btn_disabled').find('span').text(lang.upload);
            if(result.status == '1'){
                $('#'+txt).val(result.data);
            } else {
                $.pinphp.tip({content:result.msg, icon:'error'});
            }
        }
    });
}
</script>
</body>
</html>